/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.agenda.model.persistence;

import com.agenda.model.repository.AgendaRepository;
import com.agenda.model.repository.ConvenioMedicoRepository;
import com.agenda.model.repository.MedicoRepository;
import com.agenda.model.repository.PacienteRepository;
import com.agenda.model.repository.UsuarioRepository;
import javax.persistence.EntityManager;


/**
 *
 * @author ronildo
 */
public class DAOFactory {

    public static MedicoRepository getMedicoRepository(EntityManager em){
        return new MedicoDAO().setEntityManager(em);
    }
    
    public static PacienteRepository getPacienteRepository(EntityManager em){
        return new PacienteDAO().setEntityManager(em);
    }
    
    public static UsuarioRepository getUsuarioRepository(EntityManager em){
        return new UsuarioDAO().setEntityManager(em);
    }
    
    public static AgendaRepository getAgendaRepository(EntityManager em){
        return new AgendaDAO().setEntityManager(em);
    }
    
    public static ConvenioMedicoRepository getConvenioMedicoRepository(EntityManager em){
        return new ConvenioMedicoDAO().setEntityManager(em);
    }
    
}